package com.session2;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class MyFileFilter extends FileFilter{

	@Override
	public boolean accept(File f) {
		String name = f.getName();
		if(name.endsWith(".txt")||
			name.endsWith(".java")||
			f.isDirectory())
		return true;
		return false;
	}

	@Override
	public String getDescription() {
		return "Image(.txt,.html,.java)";
	}
}
